<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>垂直对齐</title>
    <style>
      img{
        /*上*/
        vertical-align: top;
        /*居中*/
        vertical-align: middle;
        /*下*/
        vertical-align: bottom;
        /*行内或行内块默认对齐方式基线*/
        vertical-align: baseline;
      }
    </style>
</head>
<body>
<input type="text"><img src="../image/b.jpg" alt="">
</body>
</html>